package com.itcast.demo_one

import android.annotation.SuppressLint
import android.os.Bundle
import android.widget.ImageView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import com.bumptech.glide.Glide


class ImageViewActivity : AppCompatActivity() {
    @SuppressLint("MissingInflatedId")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_image_view)

        // 1. 获取图片组件
        val imageView = findViewById<ImageView>(R.id.img02)
        // 2. 加载图片
        Glide.with(this).load("https://img1.baidu.com/it/u=2828685072,1423977019&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889").into(imageView)
    }
}